/*
 * SuffixAutomaton.h
 *
 *  Created on: 01-09-2013
 *      Author: Krzychu
 */

#ifndef SUFFIXAUTOMATON_H_
#define SUFFIXAUTOMATON_H_

#include "Automaton.h"

class SuffixAutomaton: public Automaton
{
public:
	SuffixAutomaton(int vertexNumber, int edgeNumber);
	virtual ~SuffixAutomaton();
	int getSuffixLink(int vertex);
	void setSuffixLink(int vertex, int link);
	int getLength(int vertex);
	void setLength(int vertex, int length);
	int getPosition(int vertex);
	void setPosition(int vertex, int position);
	int getShift(int vertex, unsigned char label);
	void setShift(int vertex, unsigned char label, int shift);
	int addNode(int art, int node, char c);
protected:
	int* suffixLink;
	int* length;
	int* position;
	int* shift;
};

#endif /* SUFFIXAUTOMATON_H_ */
